package com.wiz.data.vo.to;

import java.io.Serializable;

import com.google.common.collect.LinkedHashMultimap;

/**
 * 标准数据模板
 * @author Hakeny
 */
public class DataMessageTemplate implements Serializable,Cloneable {
	private static final long serialVersionUID = 8104872386835279596L;

	private LinkedHashMultimap<Integer, MessageFiled> messageFiledMap = LinkedHashMultimap.create();

	public LinkedHashMultimap<Integer, MessageFiled> getMessageFiledMap() {
		return messageFiledMap;
	}

	public void setMessageFiledMap(LinkedHashMultimap<Integer, MessageFiled> messageFiledMap) {
		this.messageFiledMap = messageFiledMap;
	}
	
	public void addMessageFiled(String index,MessageFiled filed){
		messageFiledMap.put(Integer.parseInt(index), filed);
	}
	
	@Override
	public Object clone() throws CloneNotSupportedException {
		DataMessageTemplate dm = (DataMessageTemplate) super.clone();
		LinkedHashMultimap<Integer, MessageFiled> newObject = LinkedHashMultimap.create();
		newObject.putAll(this.messageFiledMap);
		dm.setMessageFiledMap(newObject);
		return dm;
	}
}
